package com.css.fxfzypg.modules.baseData.repository;

import com.alibaba.fastjson.JSONObject;
import com.css.fxfzypg.modules.baseData.entity.*;
import com.css.fxfzypg.modules.baseData.queryParams.SeismicSetoutQueryParams;

import java.sql.Timestamp;
import java.util.List;

public interface SeismicSetoutRepository {
    int updateSeismicSetout(ScSeismicsetout entity);
    int updateScSupplies(ScSupplies entity);
    int updateScRescue(ScRescue entity);
    int updateScEquip(ScEquip entity);
    int updateScSanctuary(ScSanctuary entity);
    int updateScMedical(ScMedical entity);

    int saveSeismicSetout(ScSeismicsetout entity);
    int saveScSupplies(ScSupplies entity);
    int saveScRescue(ScRescue entity);
    int saveScEquip(ScEquip entity);
    int saveScSanctuary(ScSanctuary entity);
    int saveScMedical(ScMedical entity);

    JSONObject getAllSeismicSetoutParams(SeismicSetoutQueryParams queryParams, int curPage, int pageSize);

    ScSeismicsetout getSeismicSetoutById(String id);
    ScSupplies getScSuppliesById(String id);
    ScRescue getScRescueById(String id);
    ScEquip getScEquipById(String id);
    ScSanctuary getScSanctuaryById(String id);
    ScMedical getScMedicalById(String id);

    JSONObject getDetailsById(String id,String type,int curPage,int pageSize);

    ScSeismicsetout getSeismicSetoutBydivision(String provinceId, String cityId, String prefectureId);

    void deleteSeismicSetoutsById(String id,String type, Timestamp timestamp, String userId);
    void delDetails(String id,String type, Timestamp timestamp, String userId);

    List<SeismicSetout> getAll();

    void importExcel(List<SeismicSetout> seismicSetouts);

    List<ScSeismicsetout> getAllData(String province, String city, String areaNameBody);

    List<ScSupplies> getWz(String scId);

    public List<ScRescue> getScRescue(String scId);

    List<ScEquip> getEquip(String scId);

    public List<ScSanctuary> getSc(String scId);

    public List<ScMedical> getMe(String scId);

    ScSeismicsetout findByAreaId(String areaId);

    Integer countByCounty(String province, String city, String county);
    Integer countByCity(String province, String city);
    Integer countByProvince(String province);

    Integer countByProvinceAndYear(String provinceName, String taskYear);
}
